<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		<input id="test" />

		<script>
			var mouse = document.getElementById("test");
			//鼠标移动
			mouse.onmousemove = function(){
				alert("鼠标移动了");
			}
			
			//鼠标点击
			mouse.onmousedown = function(event){
				if(event.button == 0){
					alert("鼠标左键");
				}else if(event.button == 1){
					alert("鼠标中键");
				}else{
					alert("鼠标右键");
				}
			}
		</script>

	</body>
</html>
